select distinct s.ShippedDate as the_date,
		datename(dw, s.shippeddate) as day_of_week,
		datepart(mm, s.shippeddate) as [month],
		datepart(yy, s.shippeddate) as [year], 
		datepart(qq, s.shippeddate) as [quarter], 
		datepart(dy, s.shippeddate) as day_of_year,
		'N' as holiday,
		case datepart(dw, s.shippeddate)
			when (1) then 'Y'
			when (7) then 'Y'
			else 'N'
		end as weekend,
		datename(month, s.shippeddate)+'_'+
		datename(year,s.shippeddate) as year_month,
		datepart(wk, s.shippeddate) as week_of_year
from orders s
where s.shippeddate is not null
